Integrand size = 23, antiderivative size = 85 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {1}{8} \left (3 a^2-2 a b+3 b^2\right ) x+\frac {3 \left (a^2-b^2\right ) \cosh (c+d x) \sinh (c+d x)}{8 d}+\frac {(a+b) \cosh ^3(c+d x) \sinh (c+d x) \left (a+b \tanh ^2(c+d x)\right )}{4 d} \]
1/8*(3*a^2-2*a*b+3*b^2)*x+3/8*(a^2-b^2)*cosh(d*x+c)*sinh(d*x+c)/d+1/4*(a+b )*cosh(d*x+c)^3*sinh(d*x+c)*(a+b*tanh(d*x+c)^2)/d
Time = 1.68 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.74 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {4 \left (3 a^2-2 a b+3 b^2\right ) (c+d x)+8 \left (a^2-b^2\right ) \sinh (2 (c+d x))+(a+b)^2 \sinh (4 (c+d x))}{32 d} \]
(4*(3*a^2 - 2*a*b + 3*b^2)*(c + d*x) + 8*(a^2 - b^2)*Sinh[2*(c + d*x)] + ( a + b)^2*Sinh[4*(c + d*x)])/(32*d)
Time = 0.30 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.27, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4158, 315, 25, 298, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a-b \tan (i c+i d x)^2\right )^2}{\sec (i c+i d x)^4}dx\) |
\(\Big \downarrow \) 4158 |
\(\displaystyle \frac {\int \frac {\left (b \tanh ^2(c+d x)+a\right )^2}{\left (1-\tanh ^2(c+d x)\right )^3}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 315 |
\(\displaystyle \frac {\frac {(a+b) \tanh (c+d x) \left (a+b \tanh ^2(c+d x)\right )}{4 \left (1-\tanh ^2(c+d x)\right )^2}-\frac {1}{4} \int -\frac {(a-3 b) b \tanh ^2(c+d x)+a (3 a-b)}{\left (1-\tanh ^2(c+d x)\right )^2}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {1}{4} \int \frac {(a-3 b) b \tanh ^2(c+d x)+a (3 a-b)}{\left (1-\tanh ^2(c+d x)\right )^2}d\tanh (c+d x)+\frac {(a+b) \tanh (c+d x) \left (a+b \tanh ^2(c+d x)\right )}{4 \left (1-\tanh ^2(c+d x)\right )^2}}{d}\) |
\(\Big \downarrow \) 298 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (3 a^2-2 a b+3 b^2\right ) \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)+\frac {3 \left (a^2-b^2\right ) \tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}\right )+\frac {(a+b) \tanh (c+d x) \left (a+b \tanh ^2(c+d x)\right )}{4 \left (1-\tanh ^2(c+d x)\right )^2}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (3 a^2-2 a b+3 b^2\right ) \text {arctanh}(\tanh (c+d x))+\frac {3 \left (a^2-b^2\right ) \tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}\right )+\frac {(a+b) \tanh (c+d x) \left (a+b \tanh ^2(c+d x)\right )}{4 \left (1-\tanh ^2(c+d x)\right )^2}}{d}\) |
(((a + b)*Tanh[c + d*x]*(a + b*Tanh[c + d*x]^2))/(4*(1 - Tanh[c + d*x]^2)^ 2) + (((3*a^2 - 2*a*b + 3*b^2)*ArcTanh[Tanh[c + d*x]])/2 + (3*(a^2 - b^2)* Tanh[c + d*x])/(2*(1 - Tanh[c + d*x]^2)))/4)/d
3.1.89.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[(-( b*c - a*d))*x*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] - Simp[(a*d - b*c*( 2*p + 3))/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/2 + p, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[(a*d - c*b)*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(2*a*b*(p + 1))), x] - Simp[1/(2*a*b*(p + 1)) Int[(a + b*x^2)^(p + 1)*(c + d*x^2)^(q - 2)*S imp[c*(a*d - c*b*(2*p + 3)) + d*(a*d*(2*(q - 1) + 1) - b*c*(2*(p + q) + 1)) *x^2, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, - 1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, 2, p, q, x]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/(c^(m - 1)*f) Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Time = 13.07 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.46
method | result | size |
derivativedivides | \(\frac {b^{2} \left (\left (\frac {\sinh \left (d x +c \right )^{3}}{4}-\frac {3 \sinh \left (d x +c \right )}{8}\right ) \cosh \left (d x +c \right )+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 a b \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a^{2} \left (\left (\frac {\cosh \left (d x +c \right )^{3}}{4}+\frac {3 \cosh \left (d x +c \right )}{8}\right ) \sinh \left (d x +c \right )+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(124\) |
default | \(\frac {b^{2} \left (\left (\frac {\sinh \left (d x +c \right )^{3}}{4}-\frac {3 \sinh \left (d x +c \right )}{8}\right ) \cosh \left (d x +c \right )+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 a b \left (\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )^{3}}{4}-\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{8}-\frac {d x}{8}-\frac {c}{8}\right )+a^{2} \left (\left (\frac {\cosh \left (d x +c \right )^{3}}{4}+\frac {3 \cosh \left (d x +c \right )}{8}\right ) \sinh \left (d x +c \right )+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}\) | \(124\) |
risch | \(\frac {3 a^{2} x}{8}-\frac {a b x}{4}+\frac {3 b^{2} x}{8}+\frac {{\mathrm e}^{4 d x +4 c} a^{2}}{64 d}+\frac {{\mathrm e}^{4 d x +4 c} a b}{32 d}+\frac {{\mathrm e}^{4 d x +4 c} b^{2}}{64 d}+\frac {{\mathrm e}^{2 d x +2 c} a^{2}}{8 d}-\frac {{\mathrm e}^{2 d x +2 c} b^{2}}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} a^{2}}{8 d}+\frac {{\mathrm e}^{-2 d x -2 c} b^{2}}{8 d}-\frac {{\mathrm e}^{-4 d x -4 c} a^{2}}{64 d}-\frac {{\mathrm e}^{-4 d x -4 c} a b}{32 d}-\frac {{\mathrm e}^{-4 d x -4 c} b^{2}}{64 d}\) | \(187\) |
1/d*(b^2*((1/4*sinh(d*x+c)^3-3/8*sinh(d*x+c))*cosh(d*x+c)+3/8*d*x+3/8*c)+2 *a*b*(1/4*sinh(d*x+c)*cosh(d*x+c)^3-1/8*cosh(d*x+c)*sinh(d*x+c)-1/8*d*x-1/ 8*c)+a^2*((1/4*cosh(d*x+c)^3+3/8*cosh(d*x+c))*sinh(d*x+c)+3/8*d*x+3/8*c))
Time = 0.26 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.12 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (3 \, a^{2} - 2 \, a b + 3 \, b^{2}\right )} d x + {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} + 4 \, {\left (a^{2} - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{8 \, d} \]
1/8*((a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^3 + (3*a^2 - 2*a*b + 3*b^2)*d*x + ((a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 + 4*(a^2 - b^2)*cosh(d*x + c))*sinh(d*x + c))/d
\[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \cosh ^{4}{\left (c + d x \right )}\, dx \]
Leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (79) = 158\).
Time = 0.20 (sec) , antiderivative size = 171, normalized size of antiderivative = 2.01 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {1}{64} \, a^{2} {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} - \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} + \frac {1}{64} \, b^{2} {\left (24 \, x + \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} - \frac {8 \, e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {8 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} - \frac {1}{32} \, a b {\left (\frac {8 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (4 \, d x + 4 \, c\right )}}{d} + \frac {e^{\left (-4 \, d x - 4 \, c\right )}}{d}\right )} \]
1/64*a^2*(24*x + e^(4*d*x + 4*c)/d + 8*e^(2*d*x + 2*c)/d - 8*e^(-2*d*x - 2 *c)/d - e^(-4*d*x - 4*c)/d) + 1/64*b^2*(24*x + e^(4*d*x + 4*c)/d - 8*e^(2* d*x + 2*c)/d + 8*e^(-2*d*x - 2*c)/d - e^(-4*d*x - 4*c)/d) - 1/32*a*b*(8*(d *x + c)/d - e^(4*d*x + 4*c)/d + e^(-4*d*x - 4*c)/d)
Leaf count of result is larger than twice the leaf count of optimal. 186 vs. \(2 (79) = 158\).
Time = 0.36 (sec) , antiderivative size = 186, normalized size of antiderivative = 2.19 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=\frac {a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 2 \, a b e^{\left (4 \, d x + 4 \, c\right )} + b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 8 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 8 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 8 \, {\left (3 \, a^{2} - 2 \, a b + 3 \, b^{2}\right )} {\left (d x + c\right )} - {\left (18 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} - 12 \, a b e^{\left (4 \, d x + 4 \, c\right )} + 18 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 8 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} - 8 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + a^{2} + 2 \, a b + b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{64 \, d} \]
1/64*(a^2*e^(4*d*x + 4*c) + 2*a*b*e^(4*d*x + 4*c) + b^2*e^(4*d*x + 4*c) + 8*a^2*e^(2*d*x + 2*c) - 8*b^2*e^(2*d*x + 2*c) + 8*(3*a^2 - 2*a*b + 3*b^2)* (d*x + c) - (18*a^2*e^(4*d*x + 4*c) - 12*a*b*e^(4*d*x + 4*c) + 18*b^2*e^(4 *d*x + 4*c) + 8*a^2*e^(2*d*x + 2*c) - 8*b^2*e^(2*d*x + 2*c) + a^2 + 2*a*b + b^2)*e^(-4*d*x - 4*c))/d
Time = 0.25 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.20 \[ \int \cosh ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx=x\,\left (\frac {3\,a^2}{8}-\frac {a\,b}{4}+\frac {3\,b^2}{8}\right )-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (a^2-b^2\right )}{8\,d}+\frac {{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^2-b^2\right )}{8\,d}-\frac {{\mathrm {e}}^{-4\,c-4\,d\,x}\,{\left (a+b\right )}^2}{64\,d}+\frac {{\mathrm {e}}^{4\,c+4\,d\,x}\,{\left (a+b\right )}^2}{64\,d} \]